From 24ffba07d6ffd56939814198a6b570c55295e23c Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Wed, 29 Dec 2004 15:25:42 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.510 (41d2cc76oov-FQV58eycexLwIuSxMQ) manual merge --- xen/arch/x86/setup.c | 6 +++--- xen/common/domain.c | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 102256bcf9..bce33d1aa9 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -478,7 +478,7 @@ void __init __start_xen(multiboot_info_t *mbi) cmdline_parse(cmdline); /* Must do this early -- e.g., spinlocks rely on get_current(). */ - set_current(&idle0_task); + set_current(&idle0_exec_domain); /* We initialise the serial devices very early so we can get debugging. */ serial_init_stage1(); @@ -594,7 +594,7 @@ void __init __start_xen(multiboot_info_t *mbi) if ( dom0 == NULL ) panic("Error creating domain 0\n"); - set_bit(DF_PRIVILEGED, &dom0->flags); + set_bit(DF_PRIVILEGED, &dom0->d_flags); /* Grab the DOM0 command line. Skip past the image name. */ cmdline = (unsigned char *)(mod[0].string ? __va(mod[0].string) : NULL); @@ -631,7 +631,7 @@ void __init __start_xen(multiboot_info_t *mbi) /* Give up the VGA console if DOM0 is configured to grab it. */ console_endboot(cmdline && strstr(cmdline, "tty0")); - domain_unpause_by_systemcontroller(current); + domain_unpause_by_systemcontroller(current->domain); domain_unpause_by_systemcontroller(dom0); startup_cpu_idle_loop(); } diff --git a/xen/common/domain.c b/xen/common/domain.c index a69b44b0e8..5774ae9508 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -24,6 +24,7 @@ struct domain *domain_hash[DOMAIN_HASH_SIZE]; struct domain *domain_list; xmem_cache_t *domain_struct_cachep; +xmem_cache_t *exec_domain_struct_cachep; struct domain *dom0; void __init domain_startofday(void) @@ -32,7 +33,13 @@ void __init domain_startofday(void) "domain_cache", sizeof(struct domain), 0, SLAB_HWCACHE_ALIGN, NULL, NULL); if ( domain_struct_cachep == NULL ) - panic("No slab cache for domain structs."); + BUG(); + + exec_domain_struct_cachep = xmem_cache_create( + "exec_dom_cache", sizeof(struct exec_domain), + 0, SLAB_HWCACHE_ALIGN, NULL, NULL); + if ( exec_domain_struct_cachep == NULL ) + BUG(); } struct domain *do_createdomain(domid_t dom_id, unsigned int cpu) @@ -303,8 +310,6 @@ int final_setup_guestos(struct domain *p, dom0_builddomain_t *builddomain) return rc; } -extern xmem_cache_t *exec_domain_struct_cachep; - /* * final_setup_guestos is used for final setup and launching of domains other * than domain 0. ie. the domains that are being built by the userspace dom0 -- 2.30.2